package com.ocean.web.controller.product;

import com.ocean.common.core.domain.AjaxResult;
import com.ocean.productDict.domain.ONCfileMenu;
import com.ocean.productDict.domain.oNcfileMonitor;
import com.ocean.productDict.service.ONCfilemeunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 智能网格产品菜单
 */
@Controller
@RequestMapping("/nc/ncfilemenu")
public class ONCfilemeunController {

    @Autowired
    private ONCfilemeunService onCfilemeunService;
    @PostMapping("/menu")
    @ResponseBody
    public AjaxResult menu() {
        List<ONCfileMenu> list = onCfilemeunService.getmenu();
        return AjaxResult.success(list);
    }

    /**
     * 获取产品内容
     * @return
     */
    @PostMapping("/nr")
    @ResponseBody
    public AjaxResult nr(String key) {
        ONCfileMenu list = onCfilemeunService.getnr(key);
        return AjaxResult.success(list);
    }
    @PostMapping("/menulb")
    @ResponseBody
    public AjaxResult menulb() {
        List<ONCfileMenu> list = onCfilemeunService.getcplb();
        return AjaxResult.success(list);
    }
}
